package com.content.scaffold.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.content.scaffold.common.annotation.QueryField;
import com.content.scaffold.common.annotation.SensitiveField;
import com.content.scaffold.common.handler.AesEncryptHandler;
import com.content.scaffold.common.mybatis.BaseEntity;
import com.content.scaffold.model.enums.SensitiveType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author xiaojl
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_user")
@Data
public class SysUser extends BaseEntity {
    /**
     * 用户编码
     */
    private String userCode;
    /**
     * 用户编码
     */
    private String userName;
    /**
     * 密码
     */
    private String password;
    @SensitiveField(type = SensitiveType.ID_CARD,encryption = true)
    @TableField(typeHandler = AesEncryptHandler.class)
    private String cardNo;
    @SensitiveField(type = SensitiveType.PHONE,encryption = true)
    @TableField(typeHandler = AesEncryptHandler.class)
    private String mobile;

}
